package com.example.service.impl.datastatistics.yanglaofuwusheshiServiceImp;

import com.example.bean.datastatistics.yanglaofuwujigou.YangLaoFuWuJiGou;
import com.example.bean.datastatistics.yanglaofuwujigou.YangLaoFuWuJiGouDuoTiaoJian;
import com.example.bean.datastatistics.yanglaofuwusheshi.YangLaoFuWuSheShi;
import com.example.bean.datastatistics.yanglaofuwusheshi.YangLaoFuWuSheShiDuoTiaoJian;
import com.example.mapper.datastatistics.DatastatisticsMapper;
import com.example.service.datastatistics.yanglaofuwujigou.YangLaoFuWuJiGouService;
import com.example.service.datastatistics.yanglaofuwusheshi.YangLaoFuSheShiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class YangLaoFuWuSheShiServiceImp implements YangLaoFuSheShiService {

    @Autowired
    DatastatisticsMapper datastatisticsMapper;


    @Override
    public List<YangLaoFuWuSheShi> yanglaofuwusheshiList(YangLaoFuWuSheShiDuoTiaoJian yangLaoFuWuSheShiDuoTiaoJian) {
//        return datastatisticsMapper.yanglaofuwusheshiList(yangLaoFuWuSheShiDuoTiaoJian);

        List<YangLaoFuWuSheShi> yangLaoFuWuSheShiList = datastatisticsMapper.yanglaofuwusheshiList(yangLaoFuWuSheShiDuoTiaoJian);
        for (YangLaoFuWuSheShi list:yangLaoFuWuSheShiList) {
            list.setJujiayanglaoZhongxin(jujiayanglao(list));
            list.setRijianzhaoliaoZhongxin(rijianzhaoliao(list));
        }
        return yangLaoFuWuSheShiList;

    }

    @Override
    public String jujiayanglao(YangLaoFuWuSheShi yangLaoFuWuSheShi) {
        return datastatisticsMapper.jujiayanglao(yangLaoFuWuSheShi);
    }

    @Override
    public String rijianzhaoliao(YangLaoFuWuSheShi yangLaoFuWuSheShi) {
        return datastatisticsMapper.rijianzhaoliao(yangLaoFuWuSheShi);
    }

}
